<%@ taglib prefix="uthink" uri="/WEB-INF/tld/shiros.tld"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />

<title>活动订单列表中心</title>
</head>
<body>
		<nav class="breadcrumb">
			<i class="Hui-iconfont">&#xe67f;</i> 首页
		 <span class="c-gray en">&gt;</span>活动订单列表中心


		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height:1.6em;margin-top:3px"
			onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>
	</nav>
	<div class="pd-20">
		<div class="cl pd-5 bg-1 bk-gray">
			<span class="l"> 
			<a id="one" name="-1" class="title rleft def">所有活动</a>
			<a id="three" name="1" class="title def">即将开始</a>
			<a id="four" name="2" class="title def">已结束</a>
			</span>
		</div>

		<div class="mt-20"></div>
		<div class="cl pd-5 bg-1 bk-gray"> 
		<form action="<%=path%>/backstage/new-find-list?type=1" method="get" class="form form-horizontal" id="search-form">
		<input type="hidden" id="type" name="type" value='1' />
		<div class="text-c"> 
				<div class="row cl">
				<%-- 	<label class="form-label col-1">订单类型：</label>
					<div class="formControls col-2">
					<input type="text" name="title" value="${conditions.ordertype}" id="ordertype" placeholder="全部" class="input-text col-2">
					</div> --%>
				<label class="form-label col-1">订单类型:</label>
				<div class="formControls col-2">
					<span class="select-box"> <select name="ordertype"
						class="select">
							<option value="-1">--全部--</option>
							<option value="0"
								<c:if test="${conditions.ordertype==0}">selected</c:if>>购物订单</option>
							<option value="1"
								<c:if test="${conditions.ordertype==1}">selected</c:if>>充值订单</option>
							<option value="2"
								<c:if test="${conditions.ordertype==2}">selected</c:if>>充值有礼</option>
							<option value="3"
								<c:if test="${conditions.ordertype==3}">selected</c:if>>积分兑换</option>
							<option value="4"
								<c:if test="${conditions.ordertype==4}">selected</c:if>>1元购</option>
					</select>
					</span>
				</div>
					
					
			<%-- 		
					<label class="form-label col-1">订单状态：</label>
					<div class="formControls col-2">
						<input type="text" name="name" value="${conditions.dd_status}" id="dd_status" placeholder="选择" class="input-text col-2">
					</div> --%>
					
					<label class="form-label col-1">订单状态:</label>
				<div class="formControls col-2">
					<span class="select-box"> <select name="dd_status"
						class="select">
							<option value="-1">--全部--</option>
							<option value="1"
								<c:if test="${conditions.dd_status==1}">selected</c:if>>商户未确认</option>
							<option value="2"
								<c:if test="${conditions.dd_status==2}">selected</c:if>>商户确认接收订单</option>
							<option value="3"
								<c:if test="${conditions.dd_status==3}">selected</c:if>>等待配送订单</option>
							<option value="4"
								<c:if test="${conditions.dd_status==4}">selected</c:if>>配送确认接收订单</option>
							<option value="5"
								<c:if test="${conditions.dd_status==5}">selected</c:if>>配送中</option>
							<option value="6"
								<c:if test="${conditions.dd_status==6}">selected</c:if>>用户确认收货</option>
							<option value="7"
								<c:if test="${conditions.dd_status==7}">selected</c:if>>退货</option>
					</select>
					</span>
				</div>
					
					
					<label class="form-label col-1">订单编号：</label>
					<div class="formControls col-2">
						<input type="text" name="rid" value="" id="rid" placeholder="订单编号" class="input-text col-2">
					</div>
					
					<label class="form-label col-1">时间段</label>
					<div class="formControls col-2">
						<input type="text" name="stime" value="" id="stime" placeholder="开始时间" class="input-text col-2">
					</div>
					<label class="form-label col-1">至</label>
					<div class="formControls col-2">
						<input type="text" name="etime" value="" id="etime" placeholder="结束时间" class="input-text col-2">
					</div>
					
					<label class="form-label col-1">发票状态：</label>
					<div class="formControls col-2">
						<input type="text" name="status" value="" id="status" placeholder="发票状态" class="input-text col-2">
					</div>
					
					<div class="row cl">
					<button name="" id="" class="btn btn-success"
						style="border-radius: 5px; float: right;" type="submit">
						搜索</button>
					<div style="width: 10px; height: 5px; float: right;"></div>
				
					</div>
				</div>
			</div>
		</form>
		</div>
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="40">订单类型</th>
						<th>服务名称</th>
						<th>订单编号</th>
						<th>实收款（元）</th>
						<th>服务地址</th>
						<th>下单时间</th>
						<th>订单状态</th>
						<th width="220">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${newfind_list}" var="newfind">
						<tr class="text-c">
							<input type="hidden" id="id" name="id" value='${newfind.ORDERNUM}' />							
							<td>${newfind.ORDERTYPE}</td>
							<td>${newfind.TITLE}</td>
							<td>${newfind.ORDERNUM}</td>
							<td>${newfind.PAYMONEY}</td>
							<td>${newfind.ACTIVITYADRESS}</td>
							<td>${newfind.APPDATE}</td>
							<td>${newfind.DD_STATUS}</td>	
							<td class="td-manage">
								<a class="btn btn-warning"
									onClick="newfind_orderInfo(this,'${newfind.ORDERNUM}','${newfind.USER_ID}')" href="javascript:void(0);" title="查看详情">查看详情</a>
								<c:if test="${newfind.DD_STATUS==1}">
                                <a class="btn btn-primary"
									onClick="newfind_delete(this,'${newfind.ORDERNUM}')" href="javascript:void(0);" title="删除">删除</a>
                            	</c:if>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript">
	$(function() {
		$('.table-sort').dataTable({
			"aaSorting" : [ [ 0, "desc" ] ],//默认第几个排序
			"bStateSave" : true,//状态保存
			"aoColumnDefs" : [
			//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
			{
				"orderable" : false,
				"aTargets" : [ 1, 2 ]
			} // 制定列不参与排序
			]
		});
		$('.table-sort tbody').on('click', 'tr', function() {
			if ($(this).hasClass('selected')) {
				$(this).removeClass('selected');
			} else {
				table.$('tr.selected').removeClass('selected');
				$(this).addClass('selected');
			}
		});
	});

	/*删除*/
	function newfind_delete(obj,id){
		var edit_page ="<%=path%>/backstage/newfind-delete";
		layer.confirm('确认删除？', {
			btn: ['确认','取消'], 
			shade: false
		},
		function(){
			$.ajax({
				type : "POST",
				url : edit_page,
				data : "id=" + id,
				error : function() {
					layer.msg('操作失败', {icon:5,time:1000});
				},
				success : function(msg) {
					layer.msg('已删除 ', {icon:6,time:1000});
					$(obj).parents("body").find(".btn-refresh").click();
				}
			});
		},
		function(){
			layer.msg('未删除', {icon:5,time:1000});
		});	
	}
	
	function newfind_orderInfo(obj,id,user_id,w,h){
		var edit_page = "<%=path%>/backstage/newfind-orderinfo-pre?id="+id+"&user_id="+user_id;
		layer_show("详情页面",edit_page,w,h);
	}
	</script>
</body>
</html>